# coding: utf-8
from marshmallow import Schema, fields
from model.model_base import Base
from sqlalchemy import Column, String, Integer


class DepartmentVsBureau(Base):
    # 供电所对照表
    __tablename__ = 'DepartmentVsBureau'
    departmentid = Column(Integer, primary_key=True, comment='项目部编号')
    department_name = Column(String(50), nullable=False, comment='项目部名称')
    bureauid = Column(String(2), nullable=False, comment='县局编号')
    higher_department = Column(Integer, nullable=False, comment='上级部门')
    level = Column(Integer, nullable=False, comment='当前级别')


class DepartmentVsBureauSchema(Schema):
    departmentid = fields.Integer()
    department_name = fields.String()
    bureauid = fields.String()
    higher_department = fields.Integer()
    level = fields.Integer()

depvsbureauSchema = DepartmentVsBureauSchema()